(function() {
  var login;

  login = function() {
    return chrome.extension.sendRequest({
      loginInfo: 1
    }, function(response) {
      if (response && response.loginInfo) {
        document.querySelector('[name=TPL_password]').value = response.loginInfo.password;
        document.querySelector('[name=TPL_username]').value = response.loginInfo.username;
        return simulateClick(document.querySelector('#J_SubmitStatic'));
      }
    });
  };

  setTimeout(login, 3000);

}).call(this);
